home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
common
/
commandline.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
13KB
|
373 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
app = None
import wx
from pprint import pprint, pformat as pf
pp = pprint
from gui.input import input_manager as inp
try:
from di import di
except ImportError:
di = lambda i: pass
def fire(topic, *args, **kwargs):
fire = fire
import common.notifications
fire(topic, *args, **kwargs)
def im():
ImWinPanel = ImWinPanel
import gui.imwin.imwin_gui
for win in ImWinPanel.all():
return win
def where_string(duplicates = False):
import sys as sys
format_stack = format_stack
import traceback
seen = set()
s = ''
for threadId, frame in sys._current_frames().iteritems():
key = (frame.f_code.co_filename, frame.f_code.co_firstlineno)
if not duplicates and key in seen:
continue
seen.add(key)
s += '\n%s\n\n%s\n\n\n' % (threadId, ''.join(format_stack(frame)))
return s
def where(duplicates = False, stream = None):
if stream is None:
stream = sys.stdout
stream.write(where_string(duplicates))
def bl():
return blist().sorter.view
def blist():
return top(0).Children[0].blist
def bls():
return blist().sorter.buddylists
def crust_show(item):
wx.GetApp().crust.crust.display.setItem(item)
def info():
crust_show(dict(p.blist.info))
def killdigsby():
profile = profile
import common
profile.connection.stream.socket.close()
def writeidle():
if profile.connection:
profile.connection.stream.write_raw(' ')
wx.CallLater(1000, writeidle)
def sorter():
return blist().sorter
if 'wxMSW' in wx.PlatformInfo:
def ramhack():
page_out_ram = page_out_ram
import gui.native.win.process
page_out_ram()
from common import profile as p
def mcs():
pprint = pprint
import pprint
pprint(p().blist.meta_contacts)
def get_connection(name = None):
profile = profile
import
if name is True:
return profile.connection
if not name:
if len(profile.account_manager.connected_accounts):
return profile.account_manager.connected_accounts[0].connection
else:
return None
for prof in profile.account_manager.connected_accounts:
if str(prof).find(name) != -1:
return prof.connection
continue
return profile.connection
def D():
return gc(True)
def list_connections():
profile = profile
import
return [ str(p) for p in profile.account_manager.connected_accounts ]
class reloader(object):
def __call__(self, obj):
import util as util
return util.reload_(obj)
r = reloader()
class b(object):
def __getattr__(self, val, default = sentinel):
if default is sentinel:
return getattr(s(), val)
else:
return getattr(s(), val, default)
b = b()
def toggle_connection(n = 0):
profile = profile
import
profile.account_manager.accounts[n]()
def emailtimers():
return '\n'.join((lambda .0: for a in .0:
if a.enabled:
'%r %s\n' % (a.timer, a.email_address)continue)(p.emailaccounts))
def top(n = 0):
import wx
return wx.GetTopLevelWindows()[n]
def alert(*a, **k):
wx.MessageBox(*a, **k)
def hit():
return wx.FindWindowAtPoint(wx.GetMousePosition())
def ie():
return imwin.message_area
import sys
mbox = alert
def s():
import wx
blist = wx.FindWindowByName('Buddy List').Children[0].blist
i = blist.GetSelection()
if i != -1:
return blist.model[i]
def a(n = 0):
profile = profile
import
return profile.account_manager.accounts[n]
def ea(n = 0):
profile = profile
import
return profile.account_manager.emailaccounts[n]
def eea(n = 0):
profile = profile
import
return _[1][n]
def sa(n = 0):
profile = profile
import
return profile.account_manager.socialaccounts[n]
def esa(n = 0):
profile = profile
import
return _[1][n]
def rr():
skin = skin
import gui
skin.reload()
def save_workspace(name, num_lines):
pref = pref
setpref = setpref
import
history = pref('debug.shell.history.lines', [])[:num_lines]
workspaces = pref('debug.shell.workspaces', { })
workspaces[name] = history
setpref('debug.shell.workspaces', workspaces)
sw = save_workspace
def load_workspace(name):
pref = pref
import
workspaces = pref('debug.shell.workspaces', { })
if name not in workspaces:
print 'Workspace does not exist'
f_globals = sys._getframe(1).f_globals
f_locals = sys._getframe(1).f_locals
for line in reversed(workspaces[name]):
exec line in f_globals, f_locals
lw = load_workspace
def print_workspace(name):
pref = pref
import
workspaces = pref('debug.shell.workspaces', { })
if name not in workspaces:
print 'Workspace does not exist'
f_globals = sys._getframe(1).f_globals
f_locals = sys._getframe(1).f_locals
for line in reversed(workspaces[name]):
print line
pw = print_workspace
from util import leakfinder
def profilereport():
import util.introspect as util
return util.introspect.profilereport()
if getattr(sys, 'DEV', False):
from util.gcutil import *
def gctree(obj):
import util.gcutil as util
if isinstance(obj, basestring):
obj = list(util.gcutil.byclassname(obj))[-1]
return util.gcutil.gctree(obj)
def jsconsole():
show_console = show_console
import gui.browser.jsconsole
show_console()
def xmlconsole(jabber = None):
JabberProtocol = protocol
import jabber
import common
if jabber is None:
jabber = get_connection()
if not isinstance(jabber, JabberProtocol):
for conn in common.profile.account_manager.connected_accounts:
if isinstance(conn.connection, JabberProtocol):
jabber = conn.connection
break
continue
elif not isinstance(jabber, JabberProtocol):
raise AssertionError('no jabber')
show_xml_console = show_xml_console
import gui.protocols.jabbergui
show_xml_console(jabber)
def _displayHook(obj):
sys.stdout.write(repr(obj))
sys.displayhook = _displayHook
lc = list_connections
gc = get_connection
tc = toggle_connection
try:
import sip
except ImportError:
pass
from gui.toolbox import show_sizers
def w(s):
import util
print util.wireshark_format(s)
def bugreport():
send_bug_report = send_bug_report
import util.diagnostic
send_bug_report()
def spin():
Thread = Thread
currentThread = currentThread
import threading
def busyloop():
while not currentThread().busydone:
pass
t = Thread(target = busyloop)
t.busydone = False
t.start()
return t
def set_ramhack(enabled):
memfootprint = memfootprint
import gui.native
memfootprint.set_enabled(enabled)
def prettyxml(xml):
import lxml.etree as ET
return ET.tostring(ET.fromstring(xml), pretty_print = True)
if hasattr(wx, 'Crash'):
crash = wx.Crash